<?php echo $this->render('frontend_common/header.phtml'); ?>
<?php $this->headLink()->appendStylesheet($this->baseUrl('css/admintable.css')); ?>
<?php $motddh=$this->ddhlist;
$listtengiohoa=$this->listtengiohoa;
?>
<div id="Content">
<div style="margin: auto; width: 50%; margin-top: 30px; margin-bottom: 30px">

<table>
	<tr>
		<thead>
		<th>Tên giỏ hoa</th>
		<th>Số lượng mua</th>
		<th></th>
		</thead>
	</tr>
	<?php foreach ($motddh as $key=>$motct_ddh) { ?>
	<tr
	<?php
			if ($key % 2 != 0)
				echo ('class="changecolor1" style="background-color:#f3f3f3;"');
			else
				echo ('class="changecolor2" style="background-color:#FFF;"');
		?>
	>
		<td>
			<a href="<?php echo $this->url(array('controller'=>'admin','action'=>'flowerdetail','id_sp'=>$motct_ddh['giohoa_id'])) ?>"><?php echo $listtengiohoa[$motct_ddh['giohoa_id']] ?></a>
		</td>
		<td><?php echo $motct_ddh['slmua'] ?></td>
		<td><?php 
			$id=$this->id_dondathang;
			$yeucau_thaydoi_table=new Application_Model_PhieuYeuCauThayDoi();
			$list_thaydoi=$yeucau_thaydoi_table->getListPhieuYeuCauThayDoi($id, $motct_ddh['giohoa_id']);
			if(!empty($list_thaydoi)){
			?>
				<a href="<?php echo $this->url(array('controller'=>'admin','action'=>'viewcustomoder','ddh_id'=>$id,'giohoa_id'=>$motct_ddh['giohoa_id'])) ?>">Xem yêu cầu thay đổi</a>
			<?php 
			}
		?></td>
	</tr>
	<?php } ?>
</table>
<a style="border: 1px solid red; background-color: white; border-radius:5px 5px 5px; padding:5px ;font-weight: bold;color: black;text-decoration: none; margin-top: 30px;float: left;margin-bottom: 50px " href="<?php echo $this->url(array('controller'=>'admin','action'=>'odermanager')) ?>">Quay về</a>
<?php echo $this->render('frontend_common/footer.phtml'); ?>
